







[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Gets an IEqualityComparer<IEnumerable<T>> implementation
that can be used to compare collections of elements (of type T). Two collections
of T's are equal if they have the same number of items, and corresponding
items are equal, without regard to order. This is the same notion of equality as
in Algorithms.EqualSets, but encapsulated in an IEqualityComparer<IEnumerable<T>> implementation.
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
public static IEqualityComparer<IEnumerable<T>> GetSetEqualityComparer<T>( IEqualityComparer<T> equalityComparer ) |
Visual Basic (Declaration) |
---|
Public Shared Function GetSetEqualityComparer(Of T) ( _ equalityComparer As IEqualityComparer(Of T) _ ) As IEqualityComparer(Of IEnumerable(Of T)) |
Visual C++ |
---|
public: generic<typename T> static IEqualityComparer<IEnumerable<T>^>^ GetSetEqualityComparer ( IEqualityComparer<T>^ equalityComparer ) |
Parameters
- equalityComparer
- IEqualityComparer<(Of <T>)>
An IEqualityComparer<T> implementation used to compare individual T's.
Return Value
IEqualityComparer<IEnumerable<T>> implementation suitable for comparing collections of T for equality, without regard to order.
Type Parameters
- T
Examples
The following code creates a Dictionary where the keys are a set of strings, without regard to order
![]() | |
---|---|
Dictionary<IEnumerable<string>, int> = new Dictionary<IEnumerable<string>, int>(Algorithms.GetSetEqualityComparer<string>()); |